#coding=UTF-8
from threading import Thread #导入这个类
from time import sleep
def fun1(name):
    print(f"线程{name},start") #format
    for i in range(3):
        print(f"线程：{name},{i}")
        sleep(3)

    print(f"线程{name},end")

if __name__ == '__main__': #可以直接打main
    print("主线程,start")
    #创造线程
    t1=Thread(target=fun1,args=("t1",))
    t2=Thread(target=fun1,args=("t2",))
    #启动线程
    t1.start()
    t2.start()
    print("主线程,end")
